// Copyright (c) [Year] [name of copyright holder]
// [Software Name] is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2. 
// You may obtain a copy of Mulan PSL v2 at:
//          http://license.coscl.org.cn/MulanPSL2 
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.  
// See the Mulan PSL v2 for more details.

/*!
 * \autor captainpeng
 * \date 2019-1-15
 * \update 2019-1-15
 * \version 1.0
 * \copyright
 */

#ifndef MY_TYPEGEN_HPP
#define MY_TYPEGEN_HPP

namespace my{

    template<int VALUE>
    class int2type{
    public:
        static constexpr int value = VALUE;
    };

    template<bool VALUE>
    class bool2type{
    public:
        static constexpr bool value = VALUE;
    };

    // 获得最大值
    template<int V1, int ... VALUES>
    class intMax{
    public:
        using valuesType = intMax<VALUES ...>;
        static constexpr int value = (V1 > valuesType::value)? V1:valuesType::value;
    };

    template<int V1>
    class intMax<V1>{
    public:
        static constexpr int value = V1;
    };

}

#endif
